import request from '@/common/request';
import config from '@/common/config';

export function sendgetFood({
  id, page, limit, keyword,
}) {
  const result = request({
    url: `${config.server}/food?restaurantId=${id}&page=${page}&limit=${limit}&keyword=${keyword}`,
    method: 'get',

  });
  return result;
}

// 发送请求改变 foodClase 的值
export function sendgetFoodClosed({ id, available }) {
  const result = request({
    url: `${config.server}/food`,
    method: 'post',
    data: {
      id,
      data: {
        available,
      },
    },
  });
  return result;
}
